Skip to content

Add subtitle to the homepage intro section block - #4881

Merged
marcoacierno merged 1 commit into
mainfrom
claude/loving-wozniak-ex8sr8
Dec 2, 2026
Merged

marcoacierno merged 1 commit into
mainfrom
claude/loving-wozniak-ex8sr8

Conversation

@marcoacierno

Copy link
Copy Markdown
Member

What

Adds an optional Subtitle field to the "Homepage: Intro section" CMS block. When it's set, the frontend shows it under the main title. It uses the same Heading size={2} style that Text Section uses for its subtitle. An empty subtitle renders nothing.

  • Wagtail block: new subtitle = CharBlock(required=False, default=""), plus migration page/0009_alter_genericpage_body
  • GraphQL: HomeIntroSection.subtitle: String! (schema.graphql updated)
  • Frontend: the blocks.graphql fragment requests subtitle, and home-intro-section.tsx renders it

Why default="": intro sections saved before this change don't have the key. Without a default, Wagtail fills it with None, the non-null field fails, and the whole cmsPage query returns null. That would break the homepage until an editor re-saves the block. test_home_intro_section_subtitle covers a block with a subtitle and an older block without one. It fails if the default is removed.

ToDo

  • Deploy the backend to staging before relying on the frontend-lint check. Its codegen step validates fragments against pastaporto-admin.pycon.it, so it fails on the new subtitle field until that schema has it.

Generated by Claude Code

Editors can now set an optional text in "Homepage: Intro section" that
renders below the main title on the frontend.

The block defaults the new field to "" so intro sections saved before it
existed resolve to an empty string instead of None, which would otherwise
null the whole cmsPage query.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015yeTaR1pEMyPygtSpbCDEa
@vercel

vercel Bot commented Dec 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
pycon Error Error Dec 2, 2026 5:47pm UTC

Request Review

@marcoacierno
marcoacierno merged commit f4d1892 into main Dec 2, 2026
1 check failed
@marcoacierno
marcoacierno deleted the claude/loving-wozniak-ex8sr8 branch December 2, 2026 17:48

This branch had an error being deployed

1 failed deployment
Preview — b1a9879a Deployed Dec 2, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants